#!/bin/bash

while true
do
	osc r --csv openEuler:Factory --repo=standard_aarch64 --arch=aarch64 | grep -E "succeed|finished" | awk -F ';' '{print $1}' > will_disable_pkglist

	for name in `cat will_disable_pkglist`
		do
		osc api -X POST "/source/openEuler:Factory/$name?cmd=set_flag&flag=build&status=disabled"
	done
	sleep 3
done
